﻿@model UserRegistrationData
@using (Html.BeginForm("Add", "Users", FormMethod.Post, new { id = "frmAddUser" }))
{
    <div class="fieldRow">
        <div class="label">
            שם משתמש</div>
        <div class="value">
            @Html.TextBoxFor(m => m.Username)
            @Html.ValidationMessageFor(m => m.Username)</div>
    </div>
    <div class="fieldRow">
        <div class="label">
            סיסמה</div>
        <div class="value">
            @Html.TextBoxFor(m => m.Password)
            @Html.ValidationMessageFor(m => m.Password)</div>
    </div>
    <div class="fieldRow">
        <div class="label">
            אימייל</div>
        <div class="value">
            @Html.TextBoxFor(m => m.Email)
            @Html.ValidationMessageFor(m => m.Email)</div>
    </div>
    <div class="fieldRow">
        <div class="label">
            שם פרטי</div>
        <div class="value">
            @Html.TextBoxFor(m => m.FirstName)
            @Html.ValidationMessageFor(m => m.FirstName)</div>
    </div>
    <div class="fieldRow">
        <div class="label">
            שם משפחה</div>
        <div class="value">
            @Html.TextBoxFor(m => m.LastName)
            @Html.ValidationMessageFor(m => m.LastName)</div>
    </div>
    <div class="fieldRow">
        <div class="label">
            טלפון</div>
        <div class="value">
            @Html.TextBoxFor(m => m.Phone)
            @Html.ValidationMessageFor(m => m.Phone)</div>
    </div>
    <div class="fieldRow">
        <div class="label">
            הרשאה</div>
        <div class="value">
            @Html.DropDownList("UserPermissionId", (ViewBag.Permissions as SelectList), "--בחר--")
            @Html.ValidationMessageFor(m => m.UserPermissionId)
        </div>
    </div>
    <div class="clear">
        <input type="submit" value="הוסף" class="button" />
    </div>
}